package com.justech.mes.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author feifei.li
 */
public class RegexUtil {
    private static Pattern NUMBER_PATTERN = Pattern.compile("[0-9]+");

    /**
     * 判断是否为数字格式
     *
     * @param str
     * @return
     */
    public static boolean isNumeric(String str) {
        Matcher isNum = NUMBER_PATTERN.matcher(str);
        if (!isNum.matches()) {
            return false;
        }
        return true;
    }

}
